{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import math\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAhOUlEQVR4nO3deXhV5b328e+PAAkkzAlTBgYJMsoUwTq0DngOOEDVqqDVUn1FrVPVnlaPPfrWVjvZVq3UqVKVWnBs5QjWqc6oDDITgQABwpQBSEggIcn+vX8k9o0YTYCdrL137s91cbmHxd63ZO/7evKsZ61l7o6IiES/VkEHEBGR8FChi4jECBW6iEiMUKGLiMQIFbqISIxoHdQbJycne9++fYN6exGRqLRkyZJCd0+p77nACr1v374sXrw4qLcXEYlKZrb5q57TlIuISIxosNDNbKaZ5ZvZqq943szsQTPLMbMVZjY6/DFFRKQhjRmhPwlM+JrnJwKZtX+mAw8ffSwRETlcDRa6u78H7P6aTSYDT3uNj4HOZtYrXAFFRKRxwjGHngpsrXM/r/YxERFpRs26U9TMppvZYjNbXFBQ0JxvLSIS88JR6NuA9Dr302of+xJ3f8zds9w9KyWl3mWUIiJyhMKxDn0ucL2ZzQHGAcXuviMMrysiEtVCIaewrIJdxRXsKiknf1/Nf88Y3J3j0jqH/f0aLHQzmw2cCiSbWR5wF9AGwN0fAeYDZwE5wH7g+2FPKSISgcorq8nbs5+tew6Qt+cA2/YcYPveA+woPsD2veXsKimnKvTla06kdIgPptDdfWoDzztwXdgSiYhEkIqqanIL97OxoJRNRWXkFpaRW7ifzbvL2FVS8YVt28a1omenBHp3TmBcv6707JRAz04J9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GykL7gJyG6KF47qQgf+APwYiJg9u+5eUuduIhGSzd1fr734CMDH1JwGOXDunu3ua4POUasxV+dqdu7+HjUnvYso7r7D3T+tvb2PmpI69OI3zc5rlNbebVP7JyK+h2aWBpwN/LkpXj9qC93MJgPb3H150FkOZWb3mNlW4FIiZ4Re1xXAq0GHiECNuTqX1MPM+gKjgE8CjgL8e1pjGZAPvOHuEZELuJ+aQWioKV68UWdbDIqZvQn0rOepO4D/pma6pdl9XS53f9nd7wDuMLPbgeuBuyIhV+02d1Dzq/IzzZGpsbkkeplZEvAi8MNDfkMNjLtXAyNr9xX93cyGuXug+yDM7Bwg392XmNmpTfEeEV3o7j6+vsfNbDjQD1heey3qNOBTMxvr7juDylWPZ6g57XCzFHpDucxsGnAOcEZzXoDkMP69gtaYq3NJHWbWhpoyf8bdXwo6z6Hcfa+ZvU3NPoigdyqfBEwys7OABKCjmf3V3b8brjeIyikXd1/p7t3dva+796XmV+PRzVHmDTGzzDp3JwOfBZWlLjObQM2vepPcfX/QeSJUY67OJbWsZjT1BJDt7r8POs/nzCzl81VcZtYOOJMI+B66++3unlbbWVOoubJb2MocorTQI9yvzGyVma2gZkooIpZyAQ8BHYA3apdUPhJ0IAAzO8/M8oBvAPPM7LWgstTuNP786lzZwHPuvjqoPJ8zs9nAR8CxZpZnZlcGnanWScBlwOm1n6lltaPPoPUC3q79Di6iZg497EsEI5EO/RcRiREaoYuIxAgVuohIjFChi4jECBW6iEiMUKGLiMQIFbqISIxQoYuIxIj/B8sv2LWpLIkfAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AA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",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X = np.linspace(-4,4,100)\n",
    "Y = [ (1/(1+ math.e**(-x))) for x in X]\n",
    "\n",
    "plt.plot(X,Y)\n",
    "plt.show()\n",
    "\n",
    "X1 = np.linspace(-50,50,200)\n",
    "Y1 = [ (1/(1+ math.e**(-x))) for x in X1]\n",
    "plt.plot(X1,Y1)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>labels</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.017612</td>\n",
       "      <td>14.053064</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-1.395634</td>\n",
       "      <td>4.662541</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.752157</td>\n",
       "      <td>6.538620</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-1.322371</td>\n",
       "      <td>7.152853</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.423363</td>\n",
       "      <td>11.054677</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>0.677983</td>\n",
       "      <td>2.556666</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>0.761349</td>\n",
       "      <td>10.693862</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>-2.168791</td>\n",
       "      <td>0.143632</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>1.388610</td>\n",
       "      <td>9.341997</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>0.317029</td>\n",
       "      <td>14.739025</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          x1         x2  labels\n",
       "0  -0.017612  14.053064       0\n",
       "1  -1.395634   4.662541       1\n",
       "2  -0.752157   6.538620       0\n",
       "3  -1.322371   7.152853       0\n",
       "4   0.423363  11.054677       0\n",
       "..       ...        ...     ...\n",
       "95  0.677983   2.556666       1\n",
       "96  0.761349  10.693862       0\n",
       "97 -2.168791   0.143632       1\n",
       "98  1.388610   9.341997       0\n",
       "99  0.317029  14.739025       0\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_table('testSet.txt',header = None)\n",
    "df.columns =['x1','x2','labels']\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def sigmoid(x):\n",
    "    return 1/(1+np.exp(-x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def BGD_LR(df,alpha = 0.001,maxCycles = 5000):\n",
    "    xMat = np.mat(df.iloc[:,:-1])\n",
    "    yMat = np.mat(df.iloc[:,-1])\n",
    "\n",
    "    m,_ = xMat.shape\n",
    "    xMat = np.column_stack((np.ones(m),xMat))\n",
    "    #样本的行和列\n",
    "\n",
    "    m,n = xMat.shape\n",
    "    weights= np.zeros((n,1))\n",
    "\n",
    "    #最优化算法，迭代更新\n",
    "    for i in range(maxCycles):\n",
    "        h  = sigmoid(xMat * weights)\n",
    "        grad = xMat.T*(h- yMat.T)/m\n",
    "        weights -= alpha * grad\n",
    "    return weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([[ 0.85428423],\n",
       "        [ 0.10822229],\n",
       "        [-0.21582062]]),\n",
       " array([[ 3.90251978],\n",
       "        [ 0.46067388],\n",
       "        [-0.58896607]]))"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weights1,weights2 = BGD_LR(df,0.01,500),BGD_LR(df,0.01,5000)\n",
    "weights1,weights2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[-1.7612000e-02,  1.4053064e+01],\n",
       "        [-1.3956340e+00,  4.6625410e+00],\n",
       "        [-7.5215700e-01,  6.5386200e+00],\n",
       "        [-1.3223710e+00,  7.1528530e+00],\n",
       "        [ 4.2336300e-01,  1.1054677e+01],\n",
       "        [ 4.0670400e-01,  7.0673350e+00],\n",
       "        [ 6.6739400e-01,  1.2741452e+01],\n",
       "        [-2.4601500e+00,  6.8668050e+00],\n",
       "        [ 5.6941100e-01,  9.5487550e+00],\n",
       "        [-2.6632000e-02,  1.0427743e+01],\n",
       "        [ 8.5043300e-01,  6.9203340e+00],\n",
       "        [ 1.3471830e+00,  1.3175500e+01],\n",
       "        [ 1.1768130e+00,  3.1670200e+00],\n",
       "        [-1.7818710e+00,  9.0979530e+00],\n",
       "        [-5.6660600e-01,  5.7490030e+00],\n",
       "        [ 9.3163500e-01,  1.5895050e+00],\n",
       "        [-2.4205000e-02,  6.1518230e+00],\n",
       "        [-3.6453000e-02,  2.6909880e+00],\n",
       "        [-1.9694900e-01,  4.4416500e-01],\n",
       "        [ 1.0144590e+00,  5.7543990e+00],\n",
       "        [ 1.9852980e+00,  3.2306190e+00],\n",
       "        [-1.6934530e+00, -5.5754000e-01],\n",
       "        [-5.7652500e-01,  1.1778922e+01],\n",
       "        [-3.4681100e-01, -1.6787300e+00],\n",
       "        [-2.1244840e+00,  2.6724710e+00],\n",
       "        [ 1.2179160e+00,  9.5970150e+00],\n",
       "        [-7.3392800e-01,  9.0986870e+00],\n",
       "        [-3.6420010e+00, -1.6180870e+00],\n",
       "        [ 3.1598500e-01,  3.5239530e+00],\n",
       "        [ 1.4166140e+00,  9.6192320e+00],\n",
       "        [-3.8632300e-01,  3.9892860e+00],\n",
       "        [ 5.5692100e-01,  8.2949840e+00],\n",
       "        [ 1.2248630e+00,  1.1587360e+01],\n",
       "        [-1.3478030e+00, -2.4060510e+00],\n",
       "        [ 1.1966040e+00,  4.9518510e+00],\n",
       "        [ 2.7522100e-01,  9.5436470e+00],\n",
       "        [ 4.7057500e-01,  9.3324880e+00],\n",
       "        [-1.8895670e+00,  9.5426620e+00],\n",
       "        [-1.5278930e+00,  1.2150579e+01],\n",
       "        [-1.1852470e+00,  1.1309318e+01],\n",
       "        [-4.4567800e-01,  3.2973030e+00],\n",
       "        [ 1.0422220e+00,  6.1051550e+00],\n",
       "        [-6.1878700e-01,  1.0320986e+01],\n",
       "        [ 1.1520830e+00,  5.4846700e-01],\n",
       "        [ 8.2853400e-01,  2.6760450e+00],\n",
       "        [-1.2377280e+00,  1.0549033e+01],\n",
       "        [-6.8356500e-01, -2.1661250e+00],\n",
       "        [ 2.2945600e-01,  5.9219380e+00],\n",
       "        [-9.5988500e-01,  1.1555336e+01],\n",
       "        [ 4.9291100e-01,  1.0993324e+01],\n",
       "        [ 1.8499200e-01,  8.7214880e+00],\n",
       "        [-3.5571500e-01,  1.0325976e+01],\n",
       "        [-3.9782200e-01,  8.0583970e+00],\n",
       "        [ 8.2483900e-01,  1.3730343e+01],\n",
       "        [ 1.5072780e+00,  5.0278660e+00],\n",
       "        [ 9.9671000e-02,  6.8358390e+00],\n",
       "        [-3.4400800e-01,  1.0717485e+01],\n",
       "        [ 1.7859280e+00,  7.7186450e+00],\n",
       "        [-9.1880100e-01,  1.1560217e+01],\n",
       "        [-3.6400900e-01,  4.7473000e+00],\n",
       "        [-8.4172200e-01,  4.1190830e+00],\n",
       "        [ 4.9042600e-01,  1.9605390e+00],\n",
       "        [-7.1940000e-03,  9.0757920e+00],\n",
       "        [ 3.5610700e-01,  1.2447863e+01],\n",
       "        [ 3.4257800e-01,  1.2281162e+01],\n",
       "        [-8.1082300e-01, -1.4660180e+00],\n",
       "        [ 2.5307770e+00,  6.4768010e+00],\n",
       "        [ 1.2966830e+00,  1.1607559e+01],\n",
       "        [ 4.7548700e-01,  1.2040035e+01],\n",
       "        [-7.8327700e-01,  1.1009725e+01],\n",
       "        [ 7.4798000e-02,  1.1023650e+01],\n",
       "        [-1.3374720e+00,  4.6833900e-01],\n",
       "        [-1.0278100e-01,  1.3763651e+01],\n",
       "        [-1.4732400e-01,  2.8748460e+00],\n",
       "        [ 5.1838900e-01,  9.8870350e+00],\n",
       "        [ 1.0153990e+00,  7.5718820e+00],\n",
       "        [-1.6580860e+00, -2.7255000e-02],\n",
       "        [ 1.3199440e+00,  2.1712280e+00],\n",
       "        [ 2.0562160e+00,  5.0199810e+00],\n",
       "        [-8.5163300e-01,  4.3756910e+00],\n",
       "        [-1.5100470e+00,  6.0619920e+00],\n",
       "        [-1.0766370e+00, -3.1818880e+00],\n",
       "        [ 1.8210960e+00,  1.0283990e+01],\n",
       "        [ 3.0101500e+00,  8.4017660e+00],\n",
       "        [-1.0994580e+00,  1.6882740e+00],\n",
       "        [-8.3487200e-01, -1.7338690e+00],\n",
       "        [-8.4663700e-01,  3.8490750e+00],\n",
       "        [ 1.4001020e+00,  1.2628781e+01],\n",
       "        [ 1.7528420e+00,  5.4681660e+00],\n",
       "        [ 7.8557000e-02,  5.9736000e-02],\n",
       "        [ 8.9392000e-02, -7.1530000e-01],\n",
       "        [ 1.8256620e+00,  1.2693808e+01],\n",
       "        [ 1.9744500e-01,  9.7446380e+00],\n",
       "        [ 1.2611700e-01,  9.2231100e-01],\n",
       "        [-6.7979700e-01,  1.2205300e+00],\n",
       "        [ 6.7798300e-01,  2.5566660e+00],\n",
       "        [ 7.6134900e-01,  1.0693862e+01],\n",
       "        [-2.1687910e+00,  1.4363200e-01],\n",
       "        [ 1.3886100e+00,  9.3419970e+00],\n",
       "        [ 3.1702900e-01,  1.4739025e+01]])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mat(df.iloc[:,:-1].values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(2, 100)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mat(df.iloc[:,:-1].values).T.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 2)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mat(df.iloc[:,:-1].values).shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plotBestFit(weights):\n",
    "    fig = plt.figure()\n",
    "    ax = fig.add_subplot(111)\n",
    "\n",
    "    # 原始数据\n",
    "    ax.scatter( df[df['labels'] == 0]['x1'], df[df['labels'] == 0]['x2'],s=30,c='red',marker='s')\n",
    "    ax.scatter( df[df['labels'] == 1]['x1'], df[df['labels'] == 1]['x2'],s=30,c='green')\n",
    "\n",
    "    #2.决策边界\n",
    "    x = np.arange(-3.0,3.2,0.1)\n",
    "    y = (0-weights[0]-weights[1]*x) / weights[2]\n",
    "    \n",
    "    ax.plot(x,y)\n",
    "    plt.xlabel('x1')\n",
    "    plt.ylabel('x2')\n",
    "\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEGCAYAAAB7DNKzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAi50lEQVR4nO3de3BcZ5nn8e8jWbZlW7YUW0lsyY6BXNgQciFG3tkASbhkElfAsAszgVmWW2FndjBD7U55GaghEKAKTM3ssmQHO4EUl3VgZ4FAinFIMgy7CYE4trN27iEhkyDJcezE98gXXZ79o0/L3VJ369J9+rzn9O9T5bJ0+qj1qFs6z3nf93nf19wdERGRcpqSDkBERMKmRCEiIhUpUYiISEVKFCIiUpEShYiIVDQj6QDisGjRIl++fHnSYYiIpMaOHTtecvfOUo9lMlEsX76c7du3Jx2GiEhqmNnz5R5T15OIiFSkRCEiIhXFnijM7FYz22tmjxYc+7yZ9ZvZzujfqjJfe7WZPWVmz5jZp+OOVURExqtHi+I7wNUljv9Xd784+rdl7INm1gz8D+Aa4Hzg/WZ2fqyRiojIOLEnCne/F9g/jS/tAZ5x92fd/STwQ2B1TYMTEZEJJTlG8Qkzezjqmuoo8XgX0FvweV90rCQzW2Nm281s+759+2odq0g6zJ8PZuP/zZ+fdGSSYkklim8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M7saWA+8y90Hko4nY7YB55jZq8xsJnAdcEfCMWVONDD8beAJd/+7pOOZDDPrzFcYmlkruYKHWK8XqnoKhJn9GDiPXEXO88D17h70HaSZPQPMAl6ODj2Qgkqt9wDfADqBg8BOd//jRIMqw8xWAf8NaAZudfcvJxtRZWb2A+AKcktfvwjc4O7fTjSoCZjZm4D7gEfI/e0BfMbdtyQXVWVmdiHwXXK/F03AP7j7jbF+TyUKERGpRF1PIiJSkRKFiIhUpEQhIiIVKVGIiEhFShQiIlKREoVIHZnZL8zsoJn9POlYRCZLiUKkvr4GfDDpIESmQolCJAZm9sZon47ZZjY32jfgAnf/JXAk6fhEpkJrPYnEwN23mdkdwJeAVuB/untqNvQRKaREIRKfG8mt2XQc+GTCsYhMm7qeROKzEJgHtAGzE45FZNqUKETiswn4G3LLxn814VhEpk1dTyIxMLP/AAy6+23R/te/MbO3Al8AXgvMM7M+4GPufleSsYpMRKvHiohIRep6EhGRipQoRESkIiUKERGpSIlCREQqUqIQEZGKlChERKQiJQoREano/wN62rcCsFqkNQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEGCAYAAAB7DNKzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAkoElEQVR4nO3deXCcd53n8fdX8m2pFSeWbUm24zinrSROiJDDhGHDAiHxZgjMciQcQwYKJyx4mNqhvDDswExYqoZQO8tM2CIOkIVhTGAKJpBiDCQD7CYw4NgODonkOHFOW/KVOJHk+NLx3T/6Uetwd+vofvo5+vOqUkl6+lHrq+7W8+3f7/s7zN0REREppCbqAEREJN6UKEREpCglChERKUqJQkREilKiEBGRomZEHUAYFi5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QEZFi1PUkIiJFKVGIiEhRShQiIlKUEoWIiBSlRCEiIkUpUYhUkJn91MxeMbMfRx2LyGQpUYhU1peAD0QdhMhUKFGIhMDMXhvs0zHHzOYH+wZc7O4/B/qijk9kKrTWk0gI3H2bmd0H/A9gLvBP7p6YDX1ERlOiEAnPbWTXbDoB/FnEsYhMm7qeRMJzFlAH1ANzIo5FZNqUKETCswn4K7LLxn8x4lhEpk1dTyIhMLM/Afrd/TvB/tf/bmb/Efgb4CKgzsz2AR92959FGavIRLR6rIiIFKWuJxERKUqJQkREilKiEBGRopQoRESkKCUKEREpSolCRESKUqIQEZGi/j8NjZdqkgeCcwAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "(None, None)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plotBestFit(weights1), plotBestFit(weights2)"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "8bfad08b73d8ae58273d7e252c9e1d922058e2a21d3a8ccb2a1b9808ae54a57f"
  },
  "kernelspec": {
   "display_name": "Python 3.8.0 32-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
